<template>
	<view class="agent-detail">
		<view class="agent-detail-box">
			<view class="title">
				注册信息
			</view>
			<view class="item">
				<text>姓名</text>
				<text>{{agentInfo.agentName}}</text>
			</view>
			<view class="item">
				<text>代理商状态</text>
				<text>{{agentInfo.status==0?'未实名':'已实名'}}</text>
			</view>
			<view class="item">
				<text>手机号</text>
				<text>{{agentInfo.linkMobile | phoneDesensitization}}</text>
			</view>
			<view class="item">
				<text>代理商号</text>
				<text>{{agentInfo.agentNo}}</text>
			</view>
			<view class="item">
				<text>注册时间</text>
				<text>{{agentInfo.addDate}}</text>
			</view>
			<view class="item">
				<text>招商经理</text>
				<text>{{agentInfo.leasingManager}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		getById,
	} from "@/api/agent";
	export default {
		data() {
			return {
				agentInfo:{},
			}
		},
		onLoad(options) {
			let id = options.id;
			this.getInfo(id);
		},
		methods: {
			getInfo(id){
				getById(id).then(res=>{
					this.agentInfo = res.data.agentInfo;
				})
			}
		}
	}
</script>

<style lang="scss">
	.agent-detail{
		&-box{
			background-image: url(../../../common/images/agent/detail-bg.png);
			background-repeat: no-repeat;
			background-size: 100% 100%;
			margin: R(30);
			padding: R(30);
			.title{
				font-weight: 600;
				font-size: R(30);
			}
			.item{
				display: flex;
				justify-content: space-between;
				align-items: center;
				margin: R(20) 0;
			}
		}
	}
</style>
